import rxAjax from '@/assets/js/ajax.js';

//SQL执行日志 api接口
export const FormSqlLogApi = {};

FormSqlLogApi.baseUrl= '/api-form/form/core/formSqlLog';
FormSqlLogApi.exportUrl= FormSqlLogApi.baseUrl + '/listExport';

//查询列表
FormSqlLogApi.query=function (parameter) {
  var url= FormSqlLogApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
FormSqlLogApi.get =function(pkId) {
  var url= FormSqlLogApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
FormSqlLogApi.save =function(parameter) {
  var url= FormSqlLogApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
FormSqlLogApi.del =function(parameter) {
  var url= FormSqlLogApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

FormSqlLogApi.getTypeList=function(){
  var url= FormSqlLogApi.baseUrl + '/getTypeList';
  return rxAjax.get(url);
}

FormSqlLogApi.delByType=function(type){
  var url = FormSqlLogApi.baseUrl + '/delByType?type='+type;
  return rxAjax.get(url);
}

export  default FormSqlLogApi;

